package com.geqian.structure.db;

/**
 * @author geqian
 * @date 15:13 2023/7/12
 */
public enum DatabaseColumn {
    // MySQL所需字段名称
    MySQLTableColumn("schema_name", "table_name", "table_comment",
            "column_name", "column_type", "column_comment",
            "is_nullable", "column_default"),

    // MySQL所需字段名称
    OracleTableColumn("USERNAME", "TABLE_NAME", "COMMENTS",
            "COLUMN_NAME", "DATA_TYPE", "COMMENTS",
            "NULLABLE", "DATA_DEFAULT"),

    // DB2所需字段名称
    DB2TableColumn("SCHEMANAME", "TABNAME", "REMARKS",
            "COLNAME", "TYPENAME", "REMARKS",
            "NULLS", "DEFAULT");
    //数据库
    private final String schemaName;
    //表名
    private final String tableName;
    //表注释
    private final String tableComment;
    //列名称
    private final String columnName;
    //列类型
    private final String columnType;
    //列注释
    private final String columnComment;
    //是否可以为空
    private final String isNullable;
    //索引
    //private final String columnKey;
    //默认值
    private final String columnDefault;
    //额外
    //private final String extra;

    DatabaseColumn(String schemaName, String tableName, String tableComment, String columnName, String columnType, String columnComment, String isNullable, String columnDefault) {
        this.schemaName = schemaName;
        this.tableName = tableName;
        this.tableComment = tableComment;
        this.columnName = columnName;
        this.columnType = columnType;
        this.columnComment = columnComment;
        this.isNullable = isNullable;
        this.columnDefault = columnDefault;
    }

    public String getSchemaName() {
        return schemaName;
    }

    public String getTableName() {
        return tableName;
    }

    public String getTableComment() {
        return tableComment;
    }

    public String getColumnName() {
        return columnName;
    }

    public String getColumnType() {
        return columnType;
    }

    public String getColumnComment() {
        return columnComment;
    }

    public String getIsNullable() {
        return isNullable;
    }


    public String getColumnDefault() {
        return columnDefault;
    }

}
